package com.example;

import java.io.Serializable;

public class RepurchaseIndicator implements Serializable {
    private static final long serialVersionUID = 1L;

    private String userId;
    private int purchaseCount;
    private double totalAmount;
    private double averageAmount;
    private double purchaseFrequency;
    private double repurchaseScore;

    public RepurchaseIndicator() {}

    public RepurchaseIndicator(String userId, int purchaseCount, double totalAmount, double averageAmount,
                               double purchaseFrequency, double repurchaseScore) {
        this.userId = userId;
        this.purchaseCount = purchaseCount;
        this.totalAmount = totalAmount;
        this.averageAmount = averageAmount;
        this.purchaseFrequency = purchaseFrequency;
        this.repurchaseScore = repurchaseScore;
    }

    // Getters and setters
    public String getUserId() { return userId; }
    public void setUserId(String userId) { this.userId = userId; }

    public int getPurchaseCount() { return purchaseCount; }
    public void setPurchaseCount(int purchaseCount) { this.purchaseCount = purchaseCount; }

    public double getTotalAmount() { return totalAmount; }
    public void setTotalAmount(double totalAmount) { this.totalAmount = totalAmount; }

    public double getAverageAmount() { return averageAmount; }
    public void setAverageAmount(double averageAmount) { this.averageAmount = averageAmount; }

    public double getPurchaseFrequency() { return purchaseFrequency; }
    public void setPurchaseFrequency(double purchaseFrequency) { this.purchaseFrequency = purchaseFrequency; }

    public double getRepurchaseScore() { return repurchaseScore; }
    public void setRepurchaseScore(double repurchaseScore) { this.repurchaseScore = repurchaseScore; }

    @Override
    public String toString() {
        return "RepurchaseIndicator{" +
                "userId='" + userId + '\'' +
                ", purchaseCount=" + purchaseCount +
                ", totalAmount=" + totalAmount +
                ", averageAmount=" + averageAmount +
                ", purchaseFrequency=" + purchaseFrequency +
                ", repurchaseScore=" + repurchaseScore +
                '}';
    }
}